fix(engine): trim attempt-id slug after truncation - #7551
Conversation
Reorder slugifyAttemptId so leading/trailing '-' and '.' are stripped after the 64-char cap, preventing git-invalid worktree branch names that end in '.'. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7551 +/- ##
==========================================
- Coverage 88.47% 88.47% -0.01%
==========================================
Files 720 720
Lines 75733 75733
Branches 22548 22548
==========================================
- Hits 67008 67004 -4
Misses 7679 7679
- Partials 1046 1050 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-20 22:06:10 UTC
Review summary Nits — 3 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
slugifyAttemptIdtrimmed leading/trailing-/.before the 64-charslice, so a long attempt id whose 64th character was.(or-) produced a git-ref-invalid worktree branch name ending in that separator. Trim again after truncation soplanWorktree/addWorktreenever build agit worktree add -bref that failscheck-ref-format.Closes #7528
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typecheck(@loopover/enginepackagetscbuild; workspace root typecheck needs a full workspace build first)npx vitest run --coverage test/unit/worktree-plan.test.ts—worktree-plan.tsat 100% lines and 100% branches in lcov (global threshold N/A for single-file run);codecov/patchshould cover the changed slugify pathnpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Engine-only change under
packages/loopover-engine+test/unit/worktree-plan.test.ts. Skipped UI/MCP/workers/actionlint/audit — no matching path changes. Fullnpm run test:ciomitted in favor of targeted critical checks for this leaf fix.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — no visible UI, frontend, docs, or extension changes.
Notes
Regression cases cover post-truncation trim firing (trailing
.and-), clean non-separator truncation (no-op), and the empty-sluginvalid_attempt_idthrow path.